﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Qu.SeniorProject.Model
{
    public class ProjectPresentation
    {
        public int ProjectId { get; set; }
        public string Title { get; set; }
        public string Students { get; set; }
        public string Major { get; set; }
        public string Gender { get; set; }
        public string Supervisors { get; set; }
        public string Examiners { get; set; }
        public string PresentationDate { get; set; }
        public string PresentationTime { get; set; }
        public string Room { get; set; }

        public void FixMultilineFields()
        {
            if (!string.IsNullOrEmpty(Students))
                Students = Regex.Replace(Students, @"\r\n", "<br/>", RegexOptions.Multiline);

            if (!string.IsNullOrEmpty(Supervisors))
                Supervisors = Regex.Replace(Supervisors, @"\r\n", "<br/>", RegexOptions.Multiline);

            if (!string.IsNullOrEmpty(Examiners))
                Examiners = Regex.Replace(Examiners, @"\r\n", "<br/>", RegexOptions.Multiline);
        }
    }
}